<template>
  <div class="checkWork">
    <div>
      <select v-model="url">
        <option v-for="item in studentWorkData" :value="item.url" :key="item.index" :disabled="!item.url">{{ item.name }}</option>
      </select>
    </div>
    <div class="checkWork-container">
      <div class="ab-box">
        <a :href="url" target="_blank">打开作业{{ url }}</a>
      </div>
    </div>
  </div>
</template>

<script>
import studentWorkData from '@/data/studentWork'
export default {
  data() {
    return {
      studentWorkData,
      url: ''
    }
  },
}
</script>

<style lang="scss" scoped>
.checkWork{
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  .checkWork-container{
    flex: 1;
    position: relative;
    .ab-box{
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
</style>